/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bahrie.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author bahrie
 */
@Entity
@Table(name="distributor")
public class Distributor implements Serializable {


    @Id
    @Column(name="id",length=10,nullable=false,unique=true)
    private int id;
    @Column(name="nama",length=100,nullable=false)
    private String nama;
    @Column(name="alamat",length=100,nullable=false)
    private String alamat;
    @Column(name="telepon",length=13,nullable=false)
    private String telepon;

    public Distributor() {
    }

    public Distributor(int id, String nama, String alamat, String telepon) {
        this.id = id;
        this.nama = nama;
        this.alamat = alamat;
        this.telepon = telepon;
    }

    public String getAlamat() {
        return alamat;
    }

    public void setAlamat(String alamat) {
        this.alamat = alamat;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getTelepon() {
        return telepon;
    }

    public void setTelepon(String telepon) {
        this.telepon = telepon;
    }
}
